<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<base href='<?php echo base_url()?>'>
<link rel="stylesheet" type="text/css" href="public/common/css/common.css"/>
<link rel="stylesheet" type="text/css" href="public/admin/css/admin.css"/>
<script src="public/common/js/jquery.js"></script>
<script src="public/common/js/plug/simple_color/jquery.colorPicker.js"></script>
<link rel="stylesheet" href="public/common/js/plug/simple_color/colorPicker.css" type="text/css">
<script>
$(function(){
	table_show(0);	
	water_type_show('<?php echo $sys_config['water_type']?>');
	
	$('.table tr td input[name="water_type"]').click(function(){
		water_type_show($(this).val());
	});
	
	$('.tab ul li').each(function(index){
		$(this).click(function(){
			$('.tab ul li').removeClass('cur');	
			$(this).addClass('cur');
			table_show(index);
		});										  
	});	  
	$('#water_word_color').colorPicker();

})
function table_show(index)
{
	$('.table').hide();
	$('.table:eq('+index+')').show();
}
function water_type_show(water_type)
{
	$('.table tr.word').hide();
	$('.table tr.image').hide();
	if(water_type === 'word')
	{
		$('.table tr.word').show();	
	}else{
		$('.table tr.image').show();	
	}	
}
</script>
</head>
<body>
	<div id="sys">
	    <?php echo $this->position->get_position();?>
   		<div class="sys_center">
        	<div class="tab left">
            	<ul>
                	<li class="cur">附件设置</li>
                    <li>会员设置</li>
                    <li>图片水印</li>
                    <li>验证安全</li>
                    <li>其他设置</li>
                </ul>
            </div>
            <div class="clear"></div>
            <div class="tab_content">
  
          		<!-- 附件设置 start -->
                <form action="<?php echo site_url('admin/system/update_sys_config')?>" method="post">
            	<table class="table">
                	<tr><th width="20%">参数名</th><th width="55%">参数值</th><th width="25%">参数说明</th></tr>
                    <tr><td class="center">缩略图默认宽度(px)：</td><td><input type="text" value="<?php echo $sys_config['thumb_width']?>" name="thumb_width" class="input_txt"></td><td><span class="red">*</span> 上传图片时生成的缩略图宽度</td></tr>
                    <tr><td class="center">缩略图默认高度(px)：</td><td><input type="text" value="<?php echo $sys_config['thumb_height']?>" name="thumb_height" class="input_txt"></td><td><span class="red">*</span> 上传图片时生成的缩略图高度</td></tr>
                    <tr><td class="center">允许上传的图片类型：</td><td><input type="text" value="<?php echo $sys_config['image_type']?>" name="image_type" class="input_txt"></td><td><span class="red">*</span> 请填写上传图片时文件的后缀名</td></tr>
                    <tr><td class="center">允许上传的文件类型：</td><td><input type="text" value="<?php echo $sys_config['file_type']?>" name="file_type" class="input_txt"></td><td><span class="red">*</span> 请填写上传文件时文件的后缀名</td></tr> 
                     <tr><td align="center" colspan="2"><input type="submit" name="submit" class="submit" value="提交" /> &nbsp;&nbsp;<input type="reset" name="reset" class="reset" value="重置" /></td><td>&nbsp;</td></tr>
                </table>
                </form>
                <!-- 附件设置 end -->
                
                <!-- 会员设置 start -->
                <form action="<?php echo site_url('admin/system/update_sys_config')?>" method="post">
                <table class="table">
                	<tr><th width="20%">参数名</th><th width="55%">参数值</th><th width="25%">参数说明</th></tr>
                    <tr><td class="center">是否开启会员注册：</td><td><input type="radio" name="member_register" value="1" <?php if($sys_config['member_register'] === '1'):?>checked<?php endif;?>>开启 <input type="radio" name="member_register" value="0" <?php if($sys_config['member_register'] === '0'):?>checked<?php endif;?>>关闭</td><td><span class="red">*</span> 关闭会员功能将不再显示注册登录页</td></tr>
                     <tr><td align="center" colspan="2"><input type="submit" name="submit" class="submit" value="提交" /> &nbsp;&nbsp;<input type="reset" name="reset" class="reset" value="重置" /></td><td>&nbsp;</td></tr>
                </table>
                </form>
                <!-- 会员设置 end -->
                
                <!-- 图片水印 start -->
                <form action="<?php echo site_url('admin/system/update_sys_config')?>" method="post" enctype="multipart/form-data">
                <table class="table">
                	<tr><th width="20%">参数名</th><th width="55%">参数值</th><th width="25%">参数说明</th></tr>
                    <tr><td class="center">图片水印：</td><td><input type="radio" name="water_status" value="1" <?php if($sys_config['water_status'] === '1'):?>checked<?php endif;?>>开启 <input type="radio" name="water_status" value="0" <?php if($sys_config['water_status'] === '0'):?>checked<?php endif;?>>关闭</td><td><span class="red">*</span> 上传图片时默认生成的水印</td></tr>
                    <tr><td class="center">水印类型：</td><td><input type="radio" name="water_type" value="word" <?php if($sys_config['water_type'] === 'word'):?>checked<?php endif;?>>文字 <input type="radio" name="water_type" value="image" <?php if($sys_config['water_type'] === 'image'):?>checked<?php endif;?>>图片</td><td><span class="red">*</span> 上传图片时默认生成的缩略图</td></tr>
                    <tr class="word"><td class="center">文字水印：</td><td><input type="text" name="water_word" value="<?php echo $sys_config['water_word']?>" class='input_txt'></td><td><span class="red">*</span> 不支持中文</td></tr>
                    <tr class="word"><td class="center">文字颜色：</td><td><input id="water_word_color" type="text" name="water_word_color" value="<?php echo $sys_config['water_word_color']?>"></td><td>&nbsp;</td></tr>
                    <tr class="word"><td class="center">文字大小：</td><td><input type="text" name="water_word_size" value="<?php echo $sys_config['water_word_size']?>" class='input_txt'>px</td><td>&nbsp;</td></tr>
                    <tr class="image"><td class="center">水印图片：</td><td><a href="<?php if($sys_config['water_path'] == ''):?>public/common/images/no-pic.gif<?php else:?><?php echo $sys_config['water_path']?><?php endif?>" target="_blank"><img src="<?php if($sys_config['water_path'] == ''):?>public/common/images/no-pic.gif<?php else:?><?php echo $sys_config['water_path']?><?php endif?>" width="100px" height="50px"></a></td><td>&nbsp;</td></tr>
                    <tr class="image"><td class="center">上传水印：</td><td><input type="file" name="water_image"></td><td><span class="red">*</span> 注意：上传水印会覆盖以前的水印图片</td></tr>
                    <tr><td class="center">水印位置：</td><td colspan="2"><input type="radio" name="water_position" value="top_left" <?php if($sys_config['water_position'] === 'top_left'):?>checked<?php endif;?>>顶部居左 <input type="radio" name="water_position" value="top_center" <?php if($sys_config['water_position'] === 'top_center'):?>checked<?php endif;?>>顶部居中 <input type="radio" name="water_position" value="top_right" <?php if($sys_config['water_position'] === 'top_right'):?>checked<?php endif;?>>顶部居右<br><input type="radio" name="water_position" value="middle_left" <?php if($sys_config['water_position'] === 'middle_left'):?>checked<?php endif;?>>中部居左 <input type="radio" name="water_position" value="middle_center" <?php if($sys_config['water_position'] === 'middle_center'):?>checked<?php endif;?>>中部居中 <input type="radio" name="water_position" value="middle_right" <?php if($sys_config['water_position'] === 'middle_right'):?>checked<?php endif;?>>中部居右<br><input type="radio" name="water_position" value="bottom_left" <?php if($sys_config['water_position'] === 'bottom_left'):?>checked<?php endif;?>>底部居左 <input type="radio" name="water_position" value="bottom_center" <?php if($sys_config['water_position'] === 'bottom_center'):?>checked<?php endif;?>>底部居中 <input type="radio" name="water_position" value="bottom_right" <?php if($sys_config['water_position'] === 'bottom_right'):?>checked<?php endif;?>>底部居右</td></tr>
                    <tr><td align="center" colspan="2"><input type="submit" name="submit" class="submit" value="提交" /> &nbsp;&nbsp;<input type="reset" name="reset" class="reset" value="重置" /></td><td>&nbsp;</td></tr>
                </table>
                </form>
                <!-- 图片水印 end -->
                
                <!-- 验证安全 start -->
                 <form action="<?php echo site_url('admin/system/update_sys_config')?>" method="post">
               	<table class="table">
                	<tr><th width="20%">参数名</th><th width="55%">参数值</th><th width="25%">参数说明</th></tr>
                    <tr><td class="center">会员注册验证码：</td><td><input type="radio" name="validate_register" value="1" <?php if($sys_config['validate_register'] === '1'):?>checked<?php endif;?>/>开启 <input type="radio" name="validate_register" value="0" <?php if($sys_config['validate_register'] === '0'):?>checked<?php endif;?>/>关闭</td><td><span class="red">*</span> 是否开启验证码</td></tr>
                    <tr><td class="center">会员登录验证码：</td><td><input type="radio" name="validate_login" value="1" <?php if($sys_config['validate_login'] === '1'):?>checked<?php endif;?> />开启 <input type="radio" name="validate_login" value="0" <?php if($sys_config['validate_login'] === '0'):?>checked<?php endif;?>/>关闭</td><td><span class="red">*</span> 是否开启验证码</td></tr>
                    <tr><td class="center">管理登录验证码：</td><td><input type="radio" name="validate_admin_login" value="1" <?php if($sys_config['validate_admin_login'] === '1'):?>checked<?php endif;?> />开启 <input type="radio" name="validate_admin_login" value="0"  <?php if($sys_config['validate_admin_login'] === '0'):?>checked<?php endif;?> />关闭</td><td><span class="red">*</span> 是否开启验证码</td></tr>
                    <tr><td align="center" colspan="2"><input type="submit" name="submit" class="submit" value="提交" /> &nbsp;&nbsp;<input type="reset" name="reset" class="reset" value="重置" /></td><td>&nbsp;</td></tr>
                </table>
                </form>
                 <!-- 验证安全 end -->
                 
                 <!-- 其他设置 start -->
                 <form action="<?php echo site_url('admin/system/update_sys_config')?>" method="post">
                  <table class="table">
                	<tr><th width="20%">参数名</th><th width="55%">参数值</th><th width="25%">参数说明</th></tr>
                    <tr><td class="center">内容标题最大长度：</td><td><input type="text" value="<?php echo $sys_config['content_title_length']?>" name="content_title_length" class="input_txt"></td><td><span class="red">*</span> 5-200之间</td></tr>
                    <tr><td class="center">内容自动摘要长度：</td><td><input type="text" value="<?php echo $sys_config['content_info_length']?>" name="content_info_length" class="input_txt"></td><td><span class="red">*</span> 5-200之间</td></tr>
                    <tr><td class="center">发布内容默认点击数：</td><td><input type="text" value="<?php echo $sys_config['hits']?>" name="hits" class="input_txt"></td><td><span class="red">*</span> 为空或0代表1-500之间的随机数</td></tr>
                    <tr><td class="center">过滤词语(用|分割)：</td><td><input type="text" value="<?php echo $sys_config['filter_words']?>" name="filter_words" class="input_txt"></td><td><span class="red">*</span> 词语会被替换成**</td></tr>
                     <tr><td align="center" colspan="2"><input type="submit" name="submit" class="submit" value="提交" /> &nbsp;&nbsp;<input type="reset" name="reset" class="reset" value="重置" /></td><td>&nbsp;</td></tr>
                </table>
                </form>
                <!-- 其他设置 end --> 
            </div>
        </div>
    </div>
</body>
</html>